from main.alarm.models import Project
from utils.serializers import CustomModelSerializer


class ProjectSerializer(CustomModelSerializer):
    """
    项目管理 简单序列化器
    """

    class Meta:
        model = Project
        fields = '__all__'


class ProjectCreateUpdateSerializer(CustomModelSerializer):
    """
    项目管理 创建/更新时的列化器
    """

    # 此处可写定制的 创建/更新 内容
    def validate(self, attrs: dict):
        return super().validate(attrs)

    class Meta:
        model = Project
        fields = '__all__'
